﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Threading;

/// <summary>
/// Summary description for BasePage
/// </summary>
public class BasePage:System.Web.UI.Page
{
	public BasePage()
	{
		//
		// TODO: Add constructor logic here
		//
	}
    protected override void InitializeCulture()
    {
        base.InitializeCulture();
        string culture;
        HttpCookie cookie = Request.Cookies["culture"];
        if (cookie == null)
        {
            cookie = new HttpCookie("culture");
            cookie.Value = "en-US";
            Request.Cookies.Add(cookie);
            // culture = Request.Cookies["culture"].Value;
            culture = "en-US";
        }
        else culture = cookie.Value;
        Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo(culture);
        Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(culture);
    }
}